package cn.bearspark.schedule.provider.rpc;

import cn.bearspark.schedule.provider.service.ScheduleService;
import cn.bearspark.schedule.rpc.ScheduleRpc;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @author f
 */
@Component
@DubboService
public class ScheduleRpcImpl implements ScheduleRpc {

    private final ScheduleService scheduleService;

    public ScheduleRpcImpl(ScheduleService scheduleService) {
        this.scheduleService = scheduleService;
    }

    @Override
    public void scheduled(int moduleCode, LocalDateTime deadline, String info) {
        scheduleService.scheduled(moduleCode, deadline, info);
    }
}
